﻿//------------------------------------------------------------------------------
// <copyright file="RpcResponse.cs" company="Microsoft">
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>
//------------------------------------------------------------------------------

namespace Microsoft.Internal.GamesTest.Rpc.Client
{
    using System.Runtime.Serialization;

    /// <summary>
    /// A message object used to encapsulate a message received from an RpcServer in response to an RpcRequest.
    /// </summary>
    [DataContract]
    internal class RpcResponse
    {
        /// <summary>
        /// Gets or sets the user-defined error code received from the remote method invocation.
        /// </summary>
        [DataMember(Name = "hookErrorCode")]
        public int HookErrorCode { get; set; }

        /// <summary>
        /// Gets or sets the error code generated by TDK RPC during the remote method invocation.
        /// </summary>
        [DataMember(Name = "rpcErrorCode")]
        public int RpcErrorCode { get; set; }

        /// <summary>
        /// Gets or sets the archive produced by the remote method invocation.
        /// </summary>
        [DataMember(Name = "archive")]
        public RpcArchive Archive { get; set; }

        /// <summary>
        /// Gets or sets the Id of the request corresponding to this response.
        /// </summary>
        [DataMember(Name = "requestId")]
        public uint RequestId { get; set; }
    }
}
